import request from '@/utils/request'

// 用户头像上传
export function uploadAvatar(data) {
    return request({
      url: '/webUser/profile/avatar',
      method: 'post',
      data: data
    })
}

// 用户信息修改
export function editUser(data) {
  return request({
    url: '/webUser/edit',
    method: 'put',
    data: data
  })
}

// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
  const data = {
    oldPassword,
    newPassword
  }
  return request({
    url: '/webUser/updatePwd',
    method: 'put',
    params: data
  })
}


